/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2018-05-17     armink       the first version
 */

#ifndef _FAL_DEF_H_
#define _FAL_DEF_H_

#include <stdint.h>
#include <stdio.h>
#include <fal_cfg.h>


#ifndef  FAL_PART_HAS_TABLE_CFG
#ifndef FAL_MALLOC
#define FAL_MALLOC      malloc
#endif

#ifndef FAL_CALLOC
#define FAL_CALLOC      calloc
#endif

#ifndef FAL_REALLOC
#define FAL_REALLOC     realloc
#endif

#ifndef FAL_FREE
#define FAL_FREE        free
#endif
#endif

#ifndef FAL_DEBUG
#define FAL_DEBUG       1
#endif


#if FAL_DEBUG
#ifdef  LOG_TAG
#undef  LOG_TAG
#endif
#define LOG_TAG         "FAL"
#include <print_log.h>

#else

#define LOG_ASSERT(f)
#define LOG_A(...)
#define LOG_E(...)
#define LOG_W(...)
#define LOG_I(...)
#define LOG_D(...)

#endif



#endif /* _FAL_DEF_H_ */
